Python 安装 .whl 文件时报错:zipfile.BadZipFile: File is not a zip file |
您所在的位置:网站首页 › pip3 install whl › Python 安装 .whl 文件时报错:zipfile.BadZipFile: File is not a zip file |
前言
.whl 是 Python 的一种第三方包安装文件,其格式本质上是一个压缩包,里面包含了 .py 文件,以及经过编译的 .pyd 文件。使得可以在不具备编译环境的情况下,选择合适自己的 Python 环境进行安装。 安装方法很简单,进入命令行输入: pip install xxxx.whl或者如果是升级 pip install -U xxxx.whl即可。 问题及解决最近在树莓派上的虚拟环境中使用如下命令: pip install tensorflow-2.4.0-cp37-none-linux_armv7l.whl安装 tensorflow 的 .whl 文件过程中总是抛出异常信息:zipfile.BadZipFile: File is not a zip file 而出现此问题的原因一般是该文件受损,重新下载 .whl 文件安装即可。 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |